package minidb.parse.exps;
import java.util.*;

public class CreateFieldList
{
	public List<CreateField> createFieldList;
	
	public CreateFieldList()
	{
		this.createFieldList=new ArrayList<CreateField>();
	}
	
	public CreateFieldList AddCreateField(CreateField cf)
	{
		this.createFieldList.add(cf);
		return this;
	}
	
	public List<CreateField> GetCreateFieldList()
	{
		return this.createFieldList;
	}
	
	public String Print()
	{
		StringBuilder sb=new StringBuilder("");
		
		for(int i=0;i<this.createFieldList.size();i++)
		{
			CreateField cf=this.createFieldList.get(i);
			sb.append(cf.Print());
			if(i!=this.createFieldList.size()-1)
				sb.append(",\n");
		}
		
		return sb.toString();
	}
}
